﻿using UnityEngine;
using System.Collections;

public class TeachWWW : MonoBehaviour {

    //Get请求
    //IEnumerator Start () {
    //       string url = "http://www.baidu.com";
    //       WWW www = new WWW(url);
    //       yield return www;
    //       Debug.Log(www.text);
    //}

    //Post请求
    IEnumerator Start()
    {
        string url = "https://www.baidu.com";
        WWWForm form = new WWWForm();
        form.AddField("username",123456);
        form.AddField("password",123456);

        WWW www = new WWW(url,form);

        yield return www;
        Debug.Log(www.text);

    }
}
